<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Tacopie: includes/tacopie/network/tcp_server.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="tacopie_logo.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Tacopie
   &#160;<span id="projectnumber">3.0.0</span>
   </div>
   <div id="projectbrief">Tacopie is a TCP Client &amp; Server C++11 library.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li><li class="navelem"><a class="el" href="dir_9a013686e2522dd95763481288c1f90f.html">tacopie</a></li><li class="navelem"><a class="el" href="dir_1619eefbac1db14eaf18adaf83ce3ccc.html">network</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">tcp_server.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// MIT License</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// Copyright (c) 2016-2017 Simon Ninon &lt;simon.ninon@gmail.com&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">// in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">// furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">// copies or substantial portions of the Software.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">// THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">// SOFTWARE.</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;atomic&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;list&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;tacopie/network/io_service.hpp&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;tacopie/network/tcp_client.hpp&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;tacopie/network/tcp_socket.hpp&gt;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;tacopie/utils/typedefs.hpp&gt;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#define __TACOPIE_CONNECTION_QUEUE_SIZE 1024</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacetacopie.html">tacopie</a> {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classtacopie_1_1tcp__server.html">   45</a></span>&#160;<span class="keyword">class </span><a class="code" href="classtacopie_1_1tcp__server.html">tcp_server</a> {</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <a class="code" href="classtacopie_1_1tcp__server.html#a4f67a38a0764924768cbcc7cf68527bf">tcp_server</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <a class="code" href="classtacopie_1_1tcp__server.html#a7841dc528e2d3dfc94fbe9b93824da50">~tcp_server</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <a class="code" href="classtacopie_1_1tcp__server.html#a4f67a38a0764924768cbcc7cf68527bf">tcp_server</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__server.html">tcp_server</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <a class="code" href="classtacopie_1_1tcp__server.html">tcp_server</a>&amp; <a class="code" href="classtacopie_1_1tcp__server.html#a7e7da4352e2e016f8d40d19bf9fee54b">operator=</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__server.html">tcp_server</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classtacopie_1_1tcp__server.html#ab9b95a27afb405668bb4d5b1a312ceae">operator==</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__server.html">tcp_server</a>&amp; rhs) <span class="keyword">const</span>;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classtacopie_1_1tcp__server.html#aa45611b77d60b536aeaf626d1724342d">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__server.html">tcp_server</a>&amp; rhs) <span class="keyword">const</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classtacopie_1_1tcp__server.html#a103cb4e6fcab00f88a708aabd38b66ff">   79</a></span>&#160;  <span class="keyword">typedef</span> std::function&lt;bool(const std::shared_ptr&lt;tcp_client&gt;&amp;)&gt; <a class="code" href="classtacopie_1_1tcp__server.html#a103cb4e6fcab00f88a708aabd38b66ff">on_new_connection_callback_t</a>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classtacopie_1_1tcp__server.html#a6cb98b50d865b32dba497273a0eca1e9">start</a>(<span class="keyword">const</span> std::string&amp; host, std::uint32_t port, <span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__server.html#a103cb4e6fcab00f88a708aabd38b66ff">on_new_connection_callback_t</a>&amp; callback = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classtacopie_1_1tcp__server.html#abc099e162432e2218faed93fc84180fd">stop</a>(<span class="keywordtype">bool</span> wait_for_removal = <span class="keyword">false</span>, <span class="keywordtype">bool</span> recursive_wait_for_removal = <span class="keyword">true</span>);</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classtacopie_1_1tcp__server.html#a76162141e6443953f3ad8e11c4e4d3d7">is_running</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp; <a class="code" href="classtacopie_1_1tcp__server.html#a39a51b9203d42babfd9c4c1a0f4cc340">get_socket</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  <span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp; <a class="code" href="classtacopie_1_1tcp__server.html#a39a51b9203d42babfd9c4c1a0f4cc340">get_socket</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <span class="keyword">const</span> std::shared_ptr&lt;tacopie::io_service&gt;&amp; <a class="code" href="classtacopie_1_1tcp__server.html#aace4796627b6abccccce1a541908414f">get_io_service</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="keyword">const</span> std::list&lt;std::shared_ptr&lt;tacopie::tcp_client&gt;&gt;&amp; <a class="code" href="classtacopie_1_1tcp__server.html#a0df81b943243ad51102c37d4944be8d7">get_clients</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="keywordtype">void</span> on_read_available(fd_t fd);</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <span class="keywordtype">void</span> on_client_disconnected(<span class="keyword">const</span> std::shared_ptr&lt;tcp_client&gt;&amp; client);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  std::shared_ptr&lt;io_service&gt; m_io_service;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <span class="comment">//1</span></div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="comment"></span>  <a class="code" href="classtacopie_1_1tcp__socket.html">tacopie::tcp_socket</a> m_socket;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  std::atomic&lt;bool&gt; m_is_running = ATOMIC_VAR_INIT(<span class="keyword">false</span>);</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  std::list&lt;std::shared_ptr&lt;tacopie::tcp_client&gt;&gt; m_clients;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;  std::mutex m_clients_mtx;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;  <a class="code" href="classtacopie_1_1tcp__server.html#a103cb4e6fcab00f88a708aabd38b66ff">on_new_connection_callback_t</a> m_on_new_connection_callback;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;};</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;} <span class="comment">// namespace tacopie</span></div><div class="ttc" id="classtacopie_1_1tcp__server_html_a4f67a38a0764924768cbcc7cf68527bf"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a4f67a38a0764924768cbcc7cf68527bf">tacopie::tcp_server::tcp_server</a></div><div class="ttdeci">tcp_server(void)</div><div class="ttdoc">ctor </div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_a7e7da4352e2e016f8d40d19bf9fee54b"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a7e7da4352e2e016f8d40d19bf9fee54b">tacopie::tcp_server::operator=</a></div><div class="ttdeci">tcp_server &amp; operator=(const tcp_server &amp;)=delete</div><div class="ttdoc">assignment operator </div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_abc099e162432e2218faed93fc84180fd"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#abc099e162432e2218faed93fc84180fd">tacopie::tcp_server::stop</a></div><div class="ttdeci">void stop(bool wait_for_removal=false, bool recursive_wait_for_removal=true)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html">tacopie::tcp_socket</a></div><div class="ttdef"><b>Definition:</b> tcp_socket.hpp:38</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html"><div class="ttname"><a href="classtacopie_1_1tcp__server.html">tacopie::tcp_server</a></div><div class="ttdef"><b>Definition:</b> tcp_server.hpp:45</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_a39a51b9203d42babfd9c4c1a0f4cc340"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a39a51b9203d42babfd9c4c1a0f4cc340">tacopie::tcp_server::get_socket</a></div><div class="ttdeci">tcp_socket &amp; get_socket(void)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_a7841dc528e2d3dfc94fbe9b93824da50"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a7841dc528e2d3dfc94fbe9b93824da50">tacopie::tcp_server::~tcp_server</a></div><div class="ttdeci">~tcp_server(void)</div><div class="ttdoc">dtor </div></div>
<div class="ttc" id="namespacetacopie_html"><div class="ttname"><a href="namespacetacopie.html">tacopie</a></div><div class="ttdef"><b>Definition:</b> io_service.hpp:48</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_a103cb4e6fcab00f88a708aabd38b66ff"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a103cb4e6fcab00f88a708aabd38b66ff">tacopie::tcp_server::on_new_connection_callback_t</a></div><div class="ttdeci">std::function&lt; bool(const std::shared_ptr&lt; tcp_client &gt; &amp;)&gt; on_new_connection_callback_t</div><div class="ttdef"><b>Definition:</b> tcp_server.hpp:79</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_ab9b95a27afb405668bb4d5b1a312ceae"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#ab9b95a27afb405668bb4d5b1a312ceae">tacopie::tcp_server::operator==</a></div><div class="ttdeci">bool operator==(const tcp_server &amp;rhs) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_a0df81b943243ad51102c37d4944be8d7"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a0df81b943243ad51102c37d4944be8d7">tacopie::tcp_server::get_clients</a></div><div class="ttdeci">const std::list&lt; std::shared_ptr&lt; tacopie::tcp_client &gt; &gt; &amp; get_clients(void) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_aace4796627b6abccccce1a541908414f"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#aace4796627b6abccccce1a541908414f">tacopie::tcp_server::get_io_service</a></div><div class="ttdeci">const std::shared_ptr&lt; tacopie::io_service &gt; &amp; get_io_service(void) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_aa45611b77d60b536aeaf626d1724342d"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#aa45611b77d60b536aeaf626d1724342d">tacopie::tcp_server::operator!=</a></div><div class="ttdeci">bool operator!=(const tcp_server &amp;rhs) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_a6cb98b50d865b32dba497273a0eca1e9"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a6cb98b50d865b32dba497273a0eca1e9">tacopie::tcp_server::start</a></div><div class="ttdeci">void start(const std::string &amp;host, std::uint32_t port, const on_new_connection_callback_t &amp;callback=nullptr)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__server_html_a76162141e6443953f3ad8e11c4e4d3d7"><div class="ttname"><a href="classtacopie_1_1tcp__server.html#a76162141e6443953f3ad8e11c4e4d3d7">tacopie::tcp_server::is_running</a></div><div class="ttdeci">bool is_running(void) const</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
